package com.financing.platform.dao.impl;


import com.financing.platform.dao.IFpOrderBizLogDao;
import com.financing.platform.dto.FpOrderBizLogDTO;
import com.financing.platform.util.SqlName;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;
import java.util.List;

/**
 * fp_order_biz_log  
 * 业务数据日志 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpOrderBizLogDao")
public class FpOrderBizLogDaoImpl extends BaseDaoImpl implements IFpOrderBizLogDao {


	@Override
	public int insert(FpOrderBizLogDTO fpOrderBizLog) throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.FpOrderBizLogSql.insert, fpOrderBizLog);
	}

	@Override
	public void update(FpOrderBizLogDTO fpOrderBizLog) throws SQLException {
		this.sqlMapClient.update(SqlName.FpOrderBizLogSql.update, fpOrderBizLog);
	}

	@Override
	public void updateForce(FpOrderBizLogDTO fpOrderBizLog) throws SQLException {
		this.sqlMapClient.update(SqlName.FpOrderBizLogSql.updateForce, fpOrderBizLog);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClient.delete(SqlName.FpOrderBizLogSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")
	@Override
	public List<FpOrderBizLogDTO> queryList(FpOrderBizLogDTO fpOrderBizLog) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.FpOrderBizLogSql.queryList, fpOrderBizLog);
	}

	@Override
	public int queryListCount(FpOrderBizLogDTO fpOrderBizLog) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.FpOrderBizLogSql.queryListCount, fpOrderBizLog);
	}

	@Override
	public FpOrderBizLogDTO loadById(Integer id) throws SQLException {
		return  (FpOrderBizLogDTO)this.sqlMapClient.queryForObject(SqlName.FpOrderBizLogSql.loadById,id);
	}
 	
}
